/**
 * @(#)ProcessUnassignTaskQueryObject.java 2010-1-13
 *   
 * Copyright  (c) 2009-2010 Wilmar IT Service,  Inc.   
 * All  rights  reserved.   
 * TODO
 */

package com.wilmar.process.entity.query;

import java.io.Serializable;
import java.util.Date;

/**
 * 父子流程关系查询对象
 * 
 * @author MaKuBEX Email:makubexnet@gmail.com
 * @version 1.0.0
 */
public class SubProcessinstanceRelationQueryObject extends QueryObject {

	/**
	 * @serialField
	 */
	private static final long serialVersionUID = -1353013712644395598L;

	private RelationCondition[] psRelationMap;
	private Date minCreateTime;
	private Date maxCreateTime;
	private Long[] relationIds;

	public void setRelationIds(Long relationId) {
		this.relationIds = new Long[] { relationId };
	}

	public void setPsRelationMap(RelationCondition psRelationMap) {
		this.psRelationMap = new RelationCondition[] { psRelationMap };
	}

	/**
	 * @return the psRelationMap
	 */
	public RelationCondition[] getPsRelationMap() {
		return psRelationMap;
	}

	/**
	 * @param psRelationMap
	 *            the psRelationMap to set
	 */
	public void setPsRelationMap(RelationCondition[] psRelationMap) {
		this.psRelationMap = psRelationMap;
	}

	/**
	 * @return the minCreateTime
	 */
	public Date getMinCreateTime() {
		return minCreateTime;
	}

	/**
	 * @param minCreateTime
	 *            the minCreateTime to set
	 */
	public void setMinCreateTime(Date minCreateTime) {
		this.minCreateTime = minCreateTime;
	}

	/**
	 * @return the maxCreateTime
	 */
	public Date getMaxCreateTime() {
		return maxCreateTime;
	}

	/**
	 * @param maxCreateTime
	 *            the maxCreateTime to set
	 */
	public void setMaxCreateTime(Date maxCreateTime) {
		this.maxCreateTime = maxCreateTime;
	}

	/**
	 * @return the relationIds
	 */
	public Long[] getRelationIds() {
		return relationIds;
	}

	/**
	 * @param relationIds
	 *            the relationIds to set
	 */
	public void setRelationIds(Long[] relationIds) {
		this.relationIds = relationIds;
	}

	/**
	 * 关联条件实体
	 * 
	 * @author makubex Email:makubexnet@gmail.com
	 * @version 1.0.0 Jun 18, 2010
	 * @since 1.0.0
	 */
	public class RelationCondition implements Serializable {

		/**
		 * @serialField
		 */
		private static final long serialVersionUID = 891668212358103433L;

		private String parentExid;
		private String subExid;

		/**
		 * 完整构造函数
		 * 
		 * @param parentExid
		 *            父流程编号
		 * @param subExid
		 *            子流程编号
		 */
		public RelationCondition(String parentExid, String subExid) {
			super();
			this.parentExid = parentExid;
			this.subExid = subExid;
		}

		/**
		 * @return the parentExid
		 */
		public String getParentExid() {
			return parentExid;
		}

		/**
		 * @param parentExid
		 *            the parentExid to set
		 */
		public void setParentExid(String parentExid) {
			this.parentExid = parentExid;
		}

		/**
		 * @return the subExid
		 */
		public String getSubExid() {
			return subExid;
		}

		/**
		 * @param subExid
		 *            the subExid to set
		 */
		public void setSubExid(String subExid) {
			this.subExid = subExid;
		}
	}
}